package com.example.backend.util;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.example.backend.entity.User;
import org.springframework.stereotype.Service;

@Service
public class
TokenService {
    public  static String getToken(User user){
        return JWT.create().withAudience(user.getUsername())
                .sign(Algorithm.HMAC256(user.getPassword()));
    }
}
